import { IImageConstructor } from "../interfaces/IImageConstructor";

export class Obstacle extends Phaser.GameObjects.Image {

    body: Phaser.Physics.Arcade.Body;

    constructor(param: IImageConstructor) {
        super(param.scene, param.x, param.y, param.texture);

        this.initImage();
        this.scene.add.existing(this);
    }

    private initImage(): void {
        this.setOrigin(0, 0)
        ;
        
        this.scene.physics.world.enable(this);
        this.body.setImmovable(true);
    }

    update(...args: any[]): void {}
}